﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Inspinia_MVC5.Models
{
    /// <summary>
    /// 班级表
    /// </summary>
    public class Class
    {
        public int ClassId { get; set; }

        [StringLength(50)]
        [Display(Name = "班级名")]
        [Required]


        public string ClassName { get; set; }
        [Display(Name = "系部")]
        [Required]



        public int? DepartmentId { get; set; }

        [StringLength(300)]
        [Display(Name = "描述")]

        public string ClassDesc { get; set; }

        public virtual Department Department { get; set; }

        //[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<Student> Student { get; set; }
    }
}